home *** CD-ROM | disk | FTP | other *** search
/ 3D Games - Real-time Rend…ng & Software Technology / 3D Games - Real-time Rendering & Software Technology.iso / flysdk / plugin / gamelib / exp_sphere.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-05-21  |  737 b   |  36 lines

  1. class exp_sphere : public bsp_object
  2. {
  3. public:
  4.         vector color;
  5.         float curradius;
  6.         stripfan_mesh *sfmesh;
  7.  
  8.         void init();
  9.         int step(int dt);
  10.         void draw();
  11.         int get_custom_param_desc(int i,param_desc *pd);
  12.         int message(vector& p,float rad,int msg,int param,void *data);
  13.         bsp_object *clone()
  14.         {
  15.         exp_sphere *tmp=new exp_sphere;
  16.         *tmp=*this;
  17.         tmp->source=this;
  18.         return tmp;
  19.         }
  20.  
  21.         exp_sphere()
  22.         { type=TYPE_EXP_SPHERE; sfmesh=0; };
  23.         ~exp_sphere()
  24.         { 
  25.             if (source==0 && sfmesh) delete sfmesh; 
  26.         };
  27. };
  28.  
  29. class exp_sphere_desc : public class_desc
  30. {
  31. public:
  32.     void *create() { return new exp_sphere; };
  33.     char *get_name() { return "expsphere"; };
  34.     int get_type() { return TYPE_EXP_SPHERE; };
  35. };
  36.